Optimal. Leaf size=49 \[ -b^2 x+\frac {a b \cos (c+d x)}{d}+\frac {\sec (c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2770, 2718}
\begin {gather*} \frac {a b \cos (c+d x)}{d}+\frac {\sec (c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{d}+b^2 (-x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2718
Rule 2770
Rubi steps
\begin {align*} \int \sec ^2(c+d x) (a+b \sin (c+d x))^2 \, dx &=\frac {\sec (c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{d}-\int \left (b^2+a b \sin (c+d x)\right ) \, dx\\ &=-b^2 x+\frac {\sec (c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{d}-(a b) \int \sin (c+d x) \, dx\\ &=-b^2 x+\frac {a b \cos (c+d x)}{d}+\frac {\sec (c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 55, normalized size = 1.12 \begin {gather*} -\frac {b^2 \tan ^{-1}(\tan (c+d x))}{d}+\frac {2 a b \sec (c+d x)}{d}+\frac {a^2 \tan (c+d x)}{d}+\frac {b^2 \tan (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.21, size = 46, normalized size = 0.94
method | result | size |
derivativedivides | \(\frac {a^{2} \tan \left (d x +c \right )+\frac {2 a b}{\cos \left (d x +c \right )}+b^{2} \left (\tan \left (d x +c \right )-d x -c \right )}{d}\) | \(46\) |
default | \(\frac {a^{2} \tan \left (d x +c \right )+\frac {2 a b}{\cos \left (d x +c \right )}+b^{2} \left (\tan \left (d x +c \right )-d x -c \right )}{d}\) | \(46\) |
risch | \(-b^{2} x +\frac {2 i a^{2}+2 i b^{2}+4 a \,{\mathrm e}^{i \left (d x +c \right )} b}{d \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )}\) | \(52\) |
norman | \(\frac {b^{2} x +b^{2} x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {4 a b \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {8 a b}{d}-b^{2} x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-b^{2} x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {2 \left (a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {4 \left (a^{2}+b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 \left (a^{2}+b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {12 a b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}\) | \(198\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 46, normalized size = 0.94 \begin {gather*} -\frac {{\left (d x + c - \tan \left (d x + c\right )\right )} b^{2} - a^{2} \tan \left (d x + c\right ) - \frac {2 \, a b}{\cos \left (d x + c\right )}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 45, normalized size = 0.92 \begin {gather*} -\frac {b^{2} d x \cos \left (d x + c\right ) - 2 \, a b - {\left (a^{2} + b^{2}\right )} \sin \left (d x + c\right )}{d \cos \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (c + d x \right )}\right )^{2} \sec ^{2}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 5.14, size = 63, normalized size = 1.29 \begin {gather*} -\frac {{\left (d x + c\right )} b^{2} + \frac {2 \, {\left (a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, a b\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.21, size = 53, normalized size = 1.08 \begin {gather*} -b^2\,x-\frac {4\,a\,b+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,a^2+2\,b^2\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________